package com.dong.agent.entity;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;
import java.util.Map;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.ai.chat.messages.MessageType;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;

/**
 * @description 消息对话表
 * @author DongPing
 * @date 2025/05/06 12:44
 **/
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "`chat_message`", autoResultMap = true)
public class ChatMessage implements Serializable {
    @Serial
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    /**
     * 会话ID
     */
    @TableField("conversation_id")
    private String conversationId;
    /**
     * 消息内容
     */
    @TableField("content")
    private String content;


    /**
     * 是否删除 0-未删除 1-已删除
     */
    @TableField("is_delete")
    @TableLogic
    private boolean isDelete;
}
